const Router = require('koa-router');
const multer = require('../../utils/multer');
const UserController = require('../../controller/UserController');

const router = new Router();

router.get('/info', UserController.getUserInfo);
router.post('/list', UserController.getUserList);
router.post('/add', multer.single('avatar'), UserController.addUser);
router.put('/:id', UserController.updateUser);
router.delete('/:id', UserController.delUser);

module.exports = router;
